//
//  IndexTableViewCell.m
//  EcShop
//
//  Created by soft on 2017/11/2.
//  Copyright © 2017年 soft. All rights reserved.
//

#import "IndexTableViewCell.h"

@implementation IndexTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        // 初始化子视图
        [self initLayout];
        //[self layoutSubviews];
    }
    return self;

}

-(void)initLayout{
    self.nameLbl = [[UILabel alloc]initWithFrame:CGRectMake(0, 0, self.contentView.bounds.size.width*0.9, self.contentView.bounds.size.height)];
    //self.nameLbl.center = CGPointMake(self.contentView.bounds.size.width*0.5, self.contentView.bounds.size.height*0.18);
    self.nameLbl.font =[UIFont systemFontOfSize:15];
     self.nameLbl.numberOfLines = 2;
     [self.contentView addSubview:self.nameLbl];
    self.priceLbl = [[UILabel alloc]initWithFrame:CGRectMake(0, 0, self.contentView.bounds.size.width*0.2, self.contentView.bounds.size.height*0.3)];
    self.priceLbl.center = CGPointMake(self.contentView.bounds.size.width*1, self.contentView.bounds.size.height*0.15);
    self.priceLbl.textColor = [UIColor redColor];
    [self.contentView addSubview:self.priceLbl];
    self.descriptionsLbl = [[UILabel alloc]initWithFrame:CGRectMake(0, self.bounds.size.height*3, self.bounds.size.width*0.8, self.bounds.size.height*0.5)];
    //self.descriptionsLbl.center = CGPointMake(self.bounds.size.width*0.5, self.bounds.size.height*3);
    self.descriptionsLbl.font =[UIFont systemFontOfSize:10];
    self.descriptionsLbl.textColor = [UIColor grayColor];
    self.descriptionsLbl.numberOfLines = 2;
    
    [self addSubview:self.descriptionsLbl];
    
    self.ima = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, self.bounds.size.width*0.25, self.bounds.size.height*2)];
    self.ima.center = CGPointMake(self.bounds.size.width*0.2, self.bounds.size.height*2);
    [self.contentView addSubview:self.ima];
    self.ima1 = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, self.bounds.size.width*0.25, self.bounds.size.height*2)];
    self.ima1.center = CGPointMake(self.bounds.size.width*0.5, self.bounds.size.height*2);
    [self.contentView addSubview:self.ima1];
    self.ima2 = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, self.bounds.size.width*0.25, self.bounds.size.height*2)];
    self.ima2.center = CGPointMake(self.bounds.size.width*0.8, self.bounds.size.height*2);
    [self.contentView addSubview:self.ima2];

}
//- (void)awakeFromNib {
//    [super awakeFromNib];
//    // Initialization code
//}

//- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
//    [super setSelected:selected animated:animated];
//
//    // Configure the view for the selected state
//}



@end
